package com.smart.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.smart.common.annotation.Excel;
import com.smart.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * user对象 user
 * 
 * @author rjh
 * @date 2025-04-26
 */
public class User extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 用户ID，主键，自增 */
    private Long id;

    /** 微信用户唯一标识 */
    @Excel(name = "微信用户唯一标识")
    private String openid;

    /** 用户名，用于用户名密码登录 */
    @Excel(name = "用户名，用于用户名密码登录")
    private String username;

    /** 用户密码，需加密存储 */
    @Excel(name = "用户密码，需加密存储")
    private String password;

    /** 用户昵称 */
    @Excel(name = "用户昵称")
    private String nickname;

    /** 用户头像地址 */
    @Excel(name = "用户头像地址")
    private String avatarUrl;

    /** 用户性别，0 未知，1 男，2 女 */
    @Excel(name = "用户性别，0 未知，1 男，2 女")
    private Integer gender;

    /** 用户所在城市 */
    @Excel(name = "用户所在城市")
    private String city;

    /** 用户所在省份 */
    @Excel(name = "用户所在省份")
    private String province;

    /** 用户所在国家 */
    @Excel(name = "用户所在国家")
    private String country;

    /** 用户手机号码 */
    @Excel(name = "用户手机号码")
    private String phoneNumber;

    /** 用户邮箱地址 */
    @Excel(name = "用户邮箱地址")
    private String email;

    /** 用户状态，1 正常，0 禁用 */
    @Excel(name = "用户状态，1 正常，0 禁用")
    private Integer status;

    /** 逻辑删除标记，0 未删除，1 已删除 */
    @Excel(name = "逻辑删除标记，0 未删除，1 已删除")
    private Integer isDeleted;

    /** 用户身高，单位厘米 */
    @Excel(name = "用户身高，单位厘米")
    private Long height;

    /** 用户体重，单位千克 */
    @Excel(name = "用户体重，单位千克")
    private Long weight;

    /** 用户生日 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "用户生日", width = 30, dateFormat = "yyyy-MM-dd")
    private Date birthday;

    /** 用户血型 */
    @Excel(name = "用户血型")
    private String bloodType;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setOpenid(String openid) 
    {
        this.openid = openid;
    }

    public String getOpenid() 
    {
        return openid;
    }

    public void setUsername(String username) 
    {
        this.username = username;
    }

    public String getUsername() 
    {
        return username;
    }

    public void setPassword(String password) 
    {
        this.password = password;
    }

    public String getPassword() 
    {
        return password;
    }

    public void setNickname(String nickname) 
    {
        this.nickname = nickname;
    }

    public String getNickname() 
    {
        return nickname;
    }

    public void setAvatarUrl(String avatarUrl) 
    {
        this.avatarUrl = avatarUrl;
    }

    public String getAvatarUrl() 
    {
        return avatarUrl;
    }

    public void setGender(Integer gender) 
    {
        this.gender = gender;
    }

    public Integer getGender() 
    {
        return gender;
    }

    public void setCity(String city) 
    {
        this.city = city;
    }

    public String getCity() 
    {
        return city;
    }

    public void setProvince(String province) 
    {
        this.province = province;
    }

    public String getProvince() 
    {
        return province;
    }

    public void setCountry(String country) 
    {
        this.country = country;
    }

    public String getCountry() 
    {
        return country;
    }

    public void setPhoneNumber(String phoneNumber) 
    {
        this.phoneNumber = phoneNumber;
    }

    public String getPhoneNumber() 
    {
        return phoneNumber;
    }

    public void setEmail(String email) 
    {
        this.email = email;
    }

    public String getEmail() 
    {
        return email;
    }

    public void setStatus(Integer status) 
    {
        this.status = status;
    }

    public Integer getStatus() 
    {
        return status;
    }

    public void setIsDeleted(Integer isDeleted) 
    {
        this.isDeleted = isDeleted;
    }

    public Integer getIsDeleted() 
    {
        return isDeleted;
    }

    public void setHeight(Long height) 
    {
        this.height = height;
    }

    public Long getHeight() 
    {
        return height;
    }

    public void setWeight(Long weight) 
    {
        this.weight = weight;
    }

    public Long getWeight() 
    {
        return weight;
    }

    public void setBirthday(Date birthday) 
    {
        this.birthday = birthday;
    }

    public Date getBirthday() 
    {
        return birthday;
    }

    public void setBloodType(String bloodType) 
    {
        this.bloodType = bloodType;
    }

    public String getBloodType() 
    {
        return bloodType;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("openid", getOpenid())
            .append("username", getUsername())
            .append("password", getPassword())
            .append("nickname", getNickname())
            .append("avatarUrl", getAvatarUrl())
            .append("gender", getGender())
            .append("city", getCity())
            .append("province", getProvince())
            .append("country", getCountry())
            .append("phoneNumber", getPhoneNumber())
            .append("email", getEmail())
            .append("status", getStatus())
            .append("isDeleted", getIsDeleted())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("height", getHeight())
            .append("weight", getWeight())
            .append("birthday", getBirthday())
            .append("bloodType", getBloodType())
            .toString();
    }
}
